package cn.usian.controller;

import cn.usian.pojo.User;
import cn.usian.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("user")
@RefreshScope
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping("findById")
    public User findById(Integer id){
        System.out.println("1111111");
        return userService.findByUserId(id);
    }
}
